﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace D3DSS.Utility
{
    public class ConfigHelper
    {
        public static T GetAppSetting<T>(object key)
        {
            return (T)Convert.ChangeType(ConfigurationManager.AppSettings[key.ToString()], typeof(T));
        }

        public static string GetConnectionString(string connectionStringName)
        {
            return ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString;
        }
    }
}
